from PyQt5.QtWidgets import QApplication, QPushButton, QMainWindow
import sys

class MainWindow(QMainWindow):
    def __init__(self):
        super().__init__()
        self.setWindowTitle("Signals and Slots")
        self.setGeometry(100, 100, 400, 300)

        button = QPushButton("Click Me", self)
        button.clicked.connect(self.on_button_click)
        button.move(100, 100)

    def on_button_click(self):
        print("Button was clicked!")

if __name__ == "__main__":
    app = QApplication(sys.argv)
    window = MainWindow()
    window.show()
    sys.exit(app.exec())
